home *** CD-ROM | disk | FTP | other *** search
- package javax.swing;
-
- class GroupLayout$PreferredGapSpring extends GroupLayout.Spring {
- private final JComponent source;
- private final JComponent target;
- private final LayoutStyle.ComponentPlacement type;
- private final int pref;
- private final int max;
- // $FF: synthetic field
- final GroupLayout this$0;
-
- GroupLayout$PreferredGapSpring(GroupLayout var1, JComponent var2, JComponent var3, LayoutStyle.ComponentPlacement var4, int var5, int var6) {
- super(var1);
- this.this$0 = var1;
- this.source = var2;
- this.target = var3;
- this.type = var4;
- this.pref = var5;
- this.max = var6;
- }
-
- int calculateMinimumSize(int var1) {
- return this.getPadding(var1);
- }
-
- int calculatePreferredSize(int var1) {
- if (this.pref != -1 && this.pref != -2) {
- int var2 = this.getMinimumSize(var1);
- int var3 = this.getMaximumSize(var1);
- return Math.min(var3, Math.max(var2, this.pref));
- } else {
- return this.getMinimumSize(var1);
- }
- }
-
- int calculateMaximumSize(int var1) {
- return this.max != -2 && this.max != -1 ? Math.max(this.getMinimumSize(var1), this.max) : this.getPadding(var1);
- }
-
- private int getPadding(int var1) {
- byte var2;
- if (var1 == 0) {
- var2 = 3;
- } else {
- var2 = 5;
- }
-
- return GroupLayout.access$800(this.this$0).getPreferredGap(this.source, this.target, this.type, var2, GroupLayout.access$700(this.this$0));
- }
- }
-